<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
            match方法：一个在字符串中执行查找匹配的 String 方法，它返回一个数组，
            在未匹配到时会返回 null。
         */
        const paragraph = 'The quick brown fox jumps over the lazy dog. It barked.';
        const regex = /[A-Z]/g;
        const found = paragraph.match(regex);
        console.log(found); //T I
    </script>
</body>

</html>